import matplotlib.pyplot as plt
import Core.utils as utils
import Core.DBSCAN as DBSCAN

for i in range(100):
    path = input("please input absolute path:")
    Eps = float(input("Eps:"))
    MinPts = int(input("MinPts:"))
    dataSet = utils.load_dataset(path)
    cluster = DBSCAN.dbscan(dataSet, Eps, MinPts)
    print(cluster)
    x = []
    y = []
    for data in dataSet:
        x.append(data[0])
        y.append(data[1])
    plt.figure(figsize=(8, 6), dpi=80)
    plt.scatter(x, y, c=cluster, marker='o')
    plt.show()

'''
2. 0.1 10
3. 0.1 4
*4. 3 4
'''